<!-- 
    系统日志
 -->

<div class="sys-logs">
  <div class="sys-logs-head">
    <span>
      <a [routerLink]="['/outer/dashboard']" class="breadcrumb">
        工作台
      </a>
      <b>
        <i nz-icon type="right" theme="outline"></i>
        系统日志
      </b>
    </span>


    <div style="width: 200px;  float: right; min-width: 260px;">
      <nz-input-group nzSearch [nzSuffix]="suffixButton">
        <input type="text" maxlength="30" nz-input placeholder="请输入关键字" (keyup)="keyupEvent($event)"
          [(ngModel)]="status.filter" />
      </nz-input-group>
      <ng-template #suffixButton>
        <button nz-button nzType="primary" nzSearch (click)="searchEvent()">搜索</button>
      </ng-template>
    </div>



    <!-- <span class="common-pager-helper">
          
        </span> -->

  </div>
  <div class="sys-logs-body">
    <!-- <nz-spin [nzTip]="" [nzSpinning]=""> -->
    <!-- <div class="common-table-wrap auto"> -->
    <div class="body">
      <nz-table #basicTable [nzData]="status.dataList" [nzShowPagination]="false" [nzScroll]="{ y: '620px' }">
        <thead style="padding-left: 20px">
          <tr>
            <th nzWidth="4%">序号</th>
            <th nzWidth="7%">姓名</th>
            <th nzWidth="10%">浏览器信息</th>
            <th nzWidth="8%">状态</th>
            <th nzWidth="8%">IP地址</th>
            <th nzWidth="8%">登录时间</th>
          </tr>
        </thead>
        <tbody style="padding-left: 20px">
          <tr *ngFor="let data of status.dataList;let idx = index">
            <td>&nbsp;&nbsp;{{idx+1}}</td>
            <td>{{data.userNameOrEmailAddress?data.userNameOrEmailAddress:'-'}}</td>
            <td class="hidden-row auto browserInfo" [title]="data.browserInfo">{{data.browserInfo}}</td>
            <td [ngClass]="{'table-danger': data.result !== '成功'}">{{data.result}}</td>
            <td>
              {{data.clientIpAddress}}
              <a href="http://www.ip138.com/ips138.asp?ip={{data.clientIpAddress}}&action=2" target="_blank">[查看]</a>
            </td>
            <td>{{data.creationTime | DateTransformPipe}}</td>
          </tr>
        </tbody>
      </nz-table>
    </div>
    <div class="pager">
      <nz-pagination [(nzPageIndex)]="status.pager.pageIndex" [nzTotal]="status.pager.totalPages"
        [nzShowTotal]="rangeTemplate" nzShowQuickJumper [nzPageSize]="status.pager.pageSize"
        (nzPageIndexChange)="pageIndexChange($event)" (nzPageSizeChange)="pageSizeChange($event)">
      </nz-pagination>
      <!-- <ng-template #renderItemTemplate let-type let-page="page">
          <a *ngIf="type === 'pre'">上页</a>
          <a *ngIf="type === 'next'">下页</a>
          <a *ngIf="type === 'page'">{{ page }}</a>
        </ng-template> -->
      <ng-template #rangeTemplate let-total>
        共 {{total}} 条
      </ng-template>
    </div>
    <!-- </div> -->
  </div>
  <!-- </nz-spin> -->





</div>